package com.gqj.system.hk;


import org.json.JSONException;
import org.json.JSONObject;

/**
 * 海康 用户信息
 */
public class HkUserInfo {

    private String employeeNo;
    private String name;
    private String userType;


    public void setEmployeeNo(String employeeNo) {
        this.employeeNo = employeeNo;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getEmployeeNo() {
        return employeeNo;
    }

    public String getName() {
        return name;
    }

    public String getUserType() {
        return userType;
    }

    // 从json获取user
    static HkUserInfo convertToHKUserInfo(JSONObject userInfoObject) throws JSONException {
        // 解析userInfoObject并创建HKUserInfo对象
        HkUserInfo hkUserInfo = new HkUserInfo();
        hkUserInfo.setEmployeeNo(userInfoObject.getString("employeeNo"));
        hkUserInfo.setName(userInfoObject.getString("name"));
        hkUserInfo.setUserType(userInfoObject.getString("userType"));
        // 其他属性解析和设置...

        return hkUserInfo;
    }

}
